package com.taxi.management.dao;

import com.taxi.management.entity.DriverEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DriverDao {
    List<DriverEntity> getAllDriver();

    DriverEntity getDriverById(@Param("id") int id);

    int addDriver(@Param("driver") DriverEntity driver);

    int updateDriver(@Param("driver") DriverEntity driver);

    int deleteDriver(@Param("id") int id);

    List<DriverEntity> getDriverByPage(
            @Param("username") String username,
            @Param("start") int start,
            @Param("limit") int limit
    );
}
